import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import {RequestParamsDto, SearchReturnDto} from "@/api/sheet/platform/list/types";

/**
 * 查询控件维护列表
 * @param query
 * @returns {*}
 */

export const getSearchAndButtonConfig = (sheetId: string | number): AxiosPromise<SearchReturnDto> => {
  return request({
    url: '/platform/list/getSearchAndButtonConfig',
    params: {sheetId: sheetId},
    method: 'get'
  });
};

/**
 * 获取列表数据
 * @param data
 */
export const getListData = (data: RequestParamsDto) => {
  return request({
    url: '/platform/list/getListData',
    method: 'post',
    data: data
  });
};
